import myaxios from  '@/mytools/myaxios'
export function BindDepType() {
    return myaxios({
      // url:'http://localhost:51905/api/RoleDbManager/GetPageList'
      url: 'SystemManager/DepartmentManager/BindDepType',
      method: 'get',
    })
  }
  

  export function SearchPage(sm) {
    return myaxios({
      //http://localhost:55117/api/SystemManager/WebSystemMenuManager​/GetWebSystemMenuViewByCode?wmc=identity
      // url:'http://localhost:51905/api/RoleDbManager/GetPageList'
      url: '/SystemManager/DepartmentManager/SearchPage',
      method: 'post',
      data: sm,
    })
  }

  export function DepartmentAdd(sm) {
    return myaxios({
      // url:'http://localhost:51905/api/RoleDbManager/GetPageList'
      url: 'SystemManager/DepartmentManager/DepartmentAdd',
      method: 'post',
      data: sm,
    })
  }

  export function GetDepartmentById(id) {
    return myaxios({
      // url:'http://localhost:51905/api/RoleDbManager/GetPageList'
       //http://localhost:55117/api/SystemManager/WebSystemMenuManager%E2%80%8B/GetWebSystemMenuViewByCode?wMCode=customer_manager
      url: 'SystemManager/DepartmentManager/GetDepartmentById?id='+id,
      method: 'get',
    })
  }

  export function DepartmentUpdate(sm) {
    return myaxios({
      //http://localhost:55117/api/SystemManager/WebSystemMenuManager​/GetWebSystemMenuViewByCode?wmc=identity
      // url:'http://localhost:51905/api/RoleDbManager/GetPageList'
      url: 'SystemManager/DepartmentManager/DepartmentUpdate',
      method: 'post',
      data: sm,
    })
  }
  export function DepartmentUpdateById(sm) {
    return myaxios({
      //http://localhost:55117/api/SystemManager/WebSystemMenuManager​/GetWebSystemMenuViewByCode?wmc=identity
      // url:'http://localhost:51905/api/RoleDbManager/GetPageList'
      url: 'SystemManager/DepartmentManager/DepartmentUpdateById?id='+sm,
      method: 'post',
    })
  }

  export function DepartmentDelete(sm) {
    return myaxios({
      // url:'http://localhost:51905/api/RoleDbManager/GetPageList'
      url: 'SystemManager/DepartmentManager/DepartmentDelete?ids='+sm,
      method: 'post',
    })
  }